package com.wyq.util;

import java.sql.Types;  
import org.hibernate.Hibernate;  
import org.hibernate.dialect.MySQL5Dialect;  
/** 
 * 注册BLOB类型 
 * @author FanYajie 
 * 
 */  
public class BlobMySQLDialect extends MySQL5Dialect {  
     public BlobMySQLDialect () {  
            super();  
            registerHibernateType(Types.LONGVARBINARY, Hibernate.BLOB.getName());//注册blob，Types.LONGVARBINARY的值就是-4  
        }  
} 